import type { IColumnsOption } from 'vc';
import { INDEX, COMPANY_NAME, BUSINESS_DATA, REGISTERED_CAPITAL, PROVINCE, CITY, COUNTRY, INDUSTRY_CATEGORY, INFO_SOURCE, TAG_YEAR } from '@/utils/tableColumn';

export function useTable() {
  const columns = ref<IColumnsOption[]>([
    { ...INDEX },
    { ...COMPANY_NAME, sortable: true },
    {
      title: '披露日期',
      field: 'noticeDate',
      width: 110,
      align: 'center',
      sortable: true
    },
    {
      ...INFO_SOURCE('tagName')
    },
    {
      ...TAG_YEAR
    },
    {
      minWidth: 150,
      field: 'evaluationResult',
      title: '审核结果'
    },
    {
      minWidth: 220,
      field: 'postAgency',
      title: '发布单位'
      // sortable: true
    },
    { ...PROVINCE },
    { ...CITY },
    { ...COUNTRY },
    { ...INDUSTRY_CATEGORY },
    { ...BUSINESS_DATA },
    { ...REGISTERED_CAPITAL }
  ]);

  return {
    columns
  };
}
